def E(t): 
    for b in range(2,int(t**0.5)+1):
        if t%==b:
            break
        else: 
            print('простое')
            break
W=['zero','one','two','three','four','five','six','seven','eight','nine']
a=input().split()
if len(a)!=3:
    print("Wrong input")
else:
    for i in range(3):
        if a[i] not in W:
            print("Wrong input")
break
for i in range(10):
    if a[0]==W[i]:
        x=i*100
if a[1]==W[i]:
    y=i*10
if a[2]==W[i]:
    z=i
s=x+y+z
E(s)
print(s)
